package com.highcom.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Aspect
@Order(1)
public class AOPAdvice2 {

//    @Before("AOPPointCut.pt1()")
//    public void before(){
//        System.out.println("前置 before ... ");
//    }
//
//    @After("AOPPointCut.pt1()")
//    public void after(){
//        System.out.println(" after... ");
//    }
//    @AfterReturning(value="AOPPointCut.pt1()",returning = "ret")
//    public void afterReturnning(Object ret){
//        System.out.println(" after... " + ret);
//    }

//    @AfterThrowing(value="AOPPointCut.pt1()",throwing = "t")
//    public void afterThrowning(Throwable t){
//        System.out.println(" afterThrowning... " + t);
//    }

//    @Around(value="AOPPointCut.pt1()")
//    public Object around(ProceedingJoinPoint pjp) throws Throwable {
//        System.out.println("前置 before ... ");
//        Object ret = pjp.proceed();
//        System.out.println("后置 after ... ");
//        return ret;
//    }

}
